﻿using System;

namespace _3._1
{
    class Program
    {


        public static void Newshape(int a,Random r)
        {
            shape s;
            switch (a)
            {
                case 1:
                     s = new Rectangle(10*r.NextDouble(), 10 * r.NextDouble());
                    break;
                case 2:
                     s = new Square(10 * r.NextDouble());
                    break;
                case 3:
                     s = new Delta(10 * r.NextDouble(), 10 * r.NextDouble(), 10 * r.NextDouble());
                    break;
                default:
                    s = new Rectangle(3, 2);
                    break;
            }
            Console.WriteLine(s.ToString());
        }
        static void Main(string[] args)
        {
            int num = 0;
            Random r = new Random();
            Random r2 = new Random();
            while (num < 10)
            {
                int p = r.Next(1, 4);
                Newshape(p, r2);
                num++;
            }
        }
    }
}
